A hint to create and use an index on the specified data column. The hint has specified action.

Namespace:  C1.LiveLinq.AdoNet
Assembly:  C1.LiveLinq (in C1.LiveLinq.dll)

Syntax

C#
public static T IndexedField<T>(
	this DataRow row,
	DataColumn column,
	IndexingHintAction action
)
Visual Basic
<ExtensionAttribute> _
Public Shared Function IndexedField(Of T) ( _
	row As DataRow, _
	column As DataColumn, _
	action As IndexingHintAction _
) As T

Parameters

row
Type: System.Data..::..DataRow
The data row.
column
Type: System.Data..::..DataColumn
The data column.
action
Type: C1.LiveLinq..::..IndexingHintAction
The action specified by the hint.

Type Parameters

T
The type of the data column

Return Value

The data column value.

Remarks

Hints are used declaratively. They tell LiveLinq query optimizer to create and use an index on that column, if possible. When the query is executed, the hint method IndexedField is replaced with the standard LINQ to DataSet extension method Field. See Hints for more details.

Examples

Copy CodeC#
var query =
    from c in customersTable
    where c.IndexedField<string>(customerColumn, IndexingHintAction.Mandatory) == "ALFKI"
    select c;

See Also